<include file="../header" />
</head>
<body class="J_scroll_fixed">
<script type="text/javascript">
    $(function() {

        if("{$hisRx.patient_name}" != ""){
            if(!confirm("是否加载 {$hisRx.patient_name}_{$hisRx.side}_{$hisRx.admin_name}({$hisRx.update_time}) 更新的处方记录？")){
                return false;
            }else{
                var id = "{$workorder.workorder_id}";
                var hisId = "{$hisRx.rx_id}";

                var url ="/admin/workorder/rx?id="+id+"&hisId="+hisId;
                window.location.href = url;
            }
        }
        $("select[name='patient']").change(function () {
            var id = "{$workorder.workorder_id}";
            var hisId = $("select[name='patient']").val();
            if(!confirm("是否加载 "+$("select[name='patient']").find("option:selected").text()+"的处方记录？")){
                return false;
            }else {
                var url = "/admin/workorder/rx?id=" + id + "&hisId=" + hisId;
                window.location.href = url;
            }
        });
/*
        if($("select[name='combo']").val() == "否") {
            $(".combo-in").hide();
        };

        $("select[name='combo']").change(function () {
            if($("select[name='combo']").val() == "是") {
                $(".combo-in").show();
            } else {
                $(".combo-in").hide();
            }

        });
*/
        $("input[name=completed]").click(function() {
            if($("input[name=completed]").is(':checked')) {
                $("button.btn_submit").text("完成");
            }else{
                $("button.btn_submit").text("更新");
            }
        });

        $("button.btn_submit").click(function() {
            if($("input[name=completed]").is(':checked')) {
                if (confirm("勾选'完成'后提交处方单将无法再次修改，是否继续提交")) {
                    $("button.btn_submit").hide();
                } else {
                    return false;
                }
            }else{
                $("button.btn_submit").hide();
            }
        })

//        $("button.btn_submit").click(function() {
//
//            if($("input[name=completed]").is(':checked')) {
//                if (!confirm("勾选'完成'后提交处方单将无法再次修改，是否继续提交？")) {
//                    return false;
//                }else{
////                    $("form").submit();
//                }
//            }
//        });
    })
</script>
<div class="wrap jj">
    <div class="common-form">
        <form method="post" class="form-horizontal J_ajaxForm" action="{:U('Workorder/rx_post')}" onkeydown="if(event.keyCode==13)return false;" >
            <input type="hidden" name="workorderId" value="{$workorderId}" />
            <input type="hidden" name="rxId" value="{$rxId}" />
            <fieldset>
                <div class="control-group">
                    <label class="control-label"></label>
                    <div class="controls" style="font-weight: bold; font-size: larger">
                        {$workorder.patient_name}({$workorder.side})
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">历史病例:</label>
                    <div class="controls">
                        <select name="patient" style="width: 600px">
                            {:getRxSelectOptionHtml($workorder['rx_id'], $workorder['patient_name'])}
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">combo(内外靴组合):</label>
                    <div class="controls">
                        <select name="combo">
                            {:getFormDictSelectOption($rx['combo'],'combo','rx',1)}
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">AFO类型（外靴）:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<20; $i++) {
                            $afotypeArr[$i]["id"] = $i;
                            $afotypeArr[$i]["name"] = $formDict["afotype_".$i];
                            }
                            if (strlen($rx["afotype_out"]) > 0) {
                            $afotype_out_id=explode(',', $rx["afotype_out"]);
                            }

                        </php>
                        <foreach name="afotypeArr" item="vo">
                            <label class="checkbox inline">
                                <php>$afotype_out_id_checked=in_array($vo['id'],$afotype_out_id)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="afotype_out_id[]" {$afotype_out_id_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                </div>
                <div class="control-group combo-in">
                    <label class="control-label">AFO类型（内靴）:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<10; $i++) {
                            $afotypeInArr[$i]["id"] = $i;
                            $afotypeInArr[$i]["name"] = $formDict["afotypein_".$i];
                            }
                            if (strlen($rx["afotype_in"]) > 0) {
                            $afotype_in_id=explode(',', $rx["afotype_in"]);
                            }

                        </php>
                        <foreach name="afotypeInArr" item="vo">
                            <label class="checkbox inline">
                                <php>$afotype_in_id_checked=in_array($vo['id'],$afotype_in_id)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="afotype_in_id[]" {$afotype_in_id_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">外靴:</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 600px" name="afotype_out_note" value="{$rx.afotype_out_note}">
                    </div>
                </div>
                <div class="control-group combo-in">
                    <label class="control-label">内靴:</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 600px" name="afotype_in_note" value="{$rx.afotype_in_note}">
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">其他:</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 600px" name="afotype_other_note" value="{$rx.afotype_other_note}">
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label" style="margin-left: 20px">-------踝铰链------</label>
                </div>
                <div class="control-group">
                    <label class="control-label">产地：</label>
                    <div class="controls">
                        <select name="ahtype">
                            {:getFormDictSelectOption($rx['ahtype'],'production','rx',1)}
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">大小：</label>
                    <div class="controls">
                        <select name="ahsize">
                            {:getFormDictSelectOption($rx['ahsize'],'ahsize','rx',1)}
                        </select>
                    </div>
                </div>
                <!--div class="control-group">
                    <label class="control-label">辅助:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<4; $i++) {
                            $dorsalsupArr[$i]["id"] = $i;
                            $dorsalsupArr[$i]["name"] = $formDict["dorsal_sup_".$i];
                            }
                            if (!isNullOrEmpty($rx["dorsal_sup"])) {
                            $dorsalsupid=explode(',', $rx["dorsal_sup"]);
                            }
                        </php>
                        <foreach name="dorsalsupArr" item="vo">
                            <label class="checkbox inline">
                                <php>$dorsal_sup_checked=in_array($vo['id'],$dorsalsupid)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="dorsal_sup_id[]" {$dorsal_sup_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                </div-->
                <div class="control-group">
                    <label class="control-label">活动限制：</label>
                    <div class="controls">
                        <select name="activity_limit">
                            {:getFormDictSelectOption($rx['activity_limit'],'activity_limit','rx',1)}
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">限制程度：</label>
                    <div class="controls">
                        <select name="limit_level">
                            {:getFormDictSelectOption($rx['limit_level'],'limit_level','rx',1)}
                        </select>
                        精确调节
                        <input type="text" class="input" style="width: 50px" name="limit_level_angle" value="{$rx.limit_level_angle}">
                        °
                    </div>
                    <div class="controls">
                        其它铰链及限制说明:
                        <input type="text" class="input" style="width: 600px" name="limit_level_other" value="{$rx.limit_level_other}">
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">铰链类型:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<7; $i++) {
                            $flexArr[$i]["id"] = $i;
                            $flexArr[$i]["name"] = $formDict["flex_".$i];
                            }
                            if (strlen($rx["flex"]) > 0) {
                            $flexid=explode(',', $rx["flex"]);
                            }
                        </php>
                        <foreach name="flexArr" item="vo">
                            <label class="checkbox inline">
                                <php>$flex_checked=in_array($vo['id'],$flexid)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="flex_id[]" {$flex_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                    <div class="controls">
                        其它:
                        <input type="text" class="input" style="width: 600px" name="flex_other" value="{$rx.flex_other}">
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">矢状面角度:</label>
                    <div class="controls">
                        &nbsp AA
                        <input type="text" class="input" style="width: 50px" name="sag_aa" value="{$rx.sag_aa}">
                        °
                    </div>
                    <div class="controls">
                        SVA
                        <input type="text" class="input" style="width: 50px" name="sag_sva" value="{$rx.sag_sva}">
                        °
                    </div>
                </div>
                <hr class="half-rule">
                <div class="control-group">
                    <label class="control-label" style="margin-left: 50px">------冠状面角度------</label>
                </div>
                <div class="control-group">
                    <label class="control-label">跟骨:</label>
                    <div class="controls">
                        <select name="heel">
                            {:getFormDictSelectOption($rx['heel'],'pose','rx',1)}
                        </select>
                        内/外翻角度
                        <input type="text" class="input"  style="width: 50px" name="heel_angle" value="{$rx.heel_angle}">
                        °
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">前足描述:</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 600px" name="forefoot" value="{$rx.forefoot}">
                    </div>
                </div>
                <hr class="half-rule">
                <!--div class="control-group">
                    <label class="control-label">小腿控制能力：</label>
                    <div class="controls">
                        A小腿前倾不足
                        <select name="shanka">
                            {:getFormDictSelectOption($rx['shanka'],'shanka','rx',1)}
                        </select>
                        <select name="in_shanka">
                            {:getFormDictSelectOption($rx['in_shanka'],'in_shanka','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        B小腿过度前倾
                        <select name="shankb">
                            {:getFormDictSelectOption($rx['shankb'],'shankb','rx',1)}
                        </select>
                    </div>
                </div>
                <hr class="half-rule"-->
                <div class="control-group">
                    <label class="control-label">外靴材料：</label>
                    <div class="controls">
                        <select name="outproduct">
                            {:getFormDictSelectOption($rx['outproduct'],'production','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        PP
                        <select name="out_pp">
                            {:getFormDictSelectOption($rx['out_pp'],'4size2345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        碳纤PP
                        <select name="out_carbpp">
                            {:getFormDictSelectOption($rx['out_carbpp'],'2size45','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        共聚PP
                        <select name="out_copp">
                            {:getFormDictSelectOption($rx['out_copp'],'3size345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        PE
                        <select name="out_pe">
                            {:getFormDictSelectOption($rx['out_pe'],'3size345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        改性PE
                        <select name="out_enhpe">
                            {:getFormDictSelectOption($rx['out_enhpe'],'3size345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        Dynamolene
                        <select name="out_dy">
                            {:getFormDictSelectOption($rx['out_dy'],'2size34','rx',1)}
                        </select>
                    </div>
                </div>

                <div class="control-group combo-in">
                    <label class="control-label">内靴材料：</label>
                    <div class="controls">
                        <select name="inproduct">
                            {:getFormDictSelectOption($rx['inproduct'],'production','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        Dynamolene
                        <select name="in_dy">
                            {:getFormDictSelectOption($rx['in_dy'],'2size34','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        改性PE
                        <select name="in_enhpe">
                            {:getFormDictSelectOption($rx['in_enhpe'],'3size345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        共聚PP
                        <select name="in_copp">
                            {:getFormDictSelectOption($rx['in_copp'],'3size345','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        PP
                        <select name="in_pp">
                            {:getFormDictSelectOption($rx['in_pp'],'2size23','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        EVA
                        <select name="in_eva">
                            {:getFormDictSelectOption($rx['in_eva'],'2size23','rx',1)}
                        </select>
                    </div>
                </div>

                <div class="control-group">
                    <label class="control-label">内衬材料：</label>
                    <div class="controls">
                        <select name="innerproduct">
                            {:getFormDictSelectOption($rx['innerproduct'],'production','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        Aliplast
                        <select name="inner_al">
                            {:getFormDictSelectOption($rx['inner_al'],'2size34','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        EVA
                        <select name="inner_eva">
                            {:getFormDictSelectOption($rx['inner_eva'],'2size23','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        其它内衬:
                        <input type="text" class="input" style="width: 600px" name="inner_other" value="{$rx.inner_other}">
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">阳型调整（外靴）:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<22; $i++) {
                            $mouldArr[$i]["id"] = $i;
                            $mouldArr[$i]["name"] = $formDict["mould_".$i];
                            }
                            if (strlen($rx["mould_out"]) > 0) {
                            $mould_out_id=explode(',', $rx["mould_out"]);
                            }

                        </php>
                        <foreach name="mouldArr" item="vo">
                            <label class="checkbox inline">
                                <php>$mould_out_id_checked=in_array($vo['id'],$mould_out_id)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="mould_out_id[]" {$mould_out_id_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                    <div class="controls">
                        跟骨内侧楔形
                        <input type="text" class="input" style="width: 50px" name="mould_out_a" value="{$rx.mould_out_a}">
                        度
                    </div>
                    <div class="controls">
                        跟骨外侧楔形
                        <input type="text" class="input" style="width: 50px" name="mould_out_b" value="{$rx.mould_out_b}">
                        度
                    </div>
                    <div class="controls">
                        中足内侧楔形
                        <input type="text" class="input" style="width: 50px" name="mould_out_c" value="{$rx.mould_out_c}">
                        度
                    </div>
                    <div class="controls">
                        中足外侧楔形
                        <input type="text" class="input" style="width: 50px" name="mould_out_d" value="{$rx.mould_out_d}">
                        度
                    </div>
                    <div class="controls">
                        前脚掌加长
                        <input type="text" class="input" style="width: 50px" name="mould_out_e" value="{$rx.mould_out_e}">
                        mm
                    </div>
                    <div class="controls">
                        跖趾关节前翘
                        <input type="text" class="input" style="width: 50px" name="mould_out_f" value="{$rx.mould_out_f}">
                        度
                    </div>
                    <div class="controls">
                        趾间关节前翘
                        <input type="text" class="input" style="width: 50px" name="mould_out_g" value="{$rx.mould_out_g}">
                        度
                    </div>
                    <div class="controls">
                        第
                        <input type="text" class="input" style="width: 50px" name="mould_out_h" value="{$rx.mould_out_h}">
                        跖趾关节下免荷
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" style="width: 600px" name="mould_out_i" value="{$rx.mould_out_i}">
                    </div>
                    <!--div class="combo-in">
                        <label class="control-label">阳型调整（内靴）:</label>
                        <div class="controls">
                            <php>
                                if (!isNullOrEmpty($rx["mould_in"])) {
                                $mould_in_id=explode(',', $rx["mould_in"]);
                                }

                            </php>
                            <foreach name="mouldArr" item="vo">
                                <label class="checkbox inline">
                                    <php>$mould_in_id_checked=in_array($vo['id'],$mould_in_id)?"checked":"";</php>
                                    <input value="{$vo.id}" type="checkbox" name="mould_in_id[]" {$mould_in_id_checked}>{$vo.name}
                                </label>
                            </foreach>
                        </div>
                        <div class="controls">
                            前脚掌加长
                            <input type="text" class="input" style="width: 50px" name="mould_in_a" value="{$rx.mould_in_a}">
                            mm
                        </div>
                        <div class="controls">
                            跖趾关节前翘
                            <input type="text" class="input" style="width: 50px" name="mould_in_b" value="{$rx.mould_in_b}">
                            度
                        </div>
                        <div class="controls">
                            趾间关节前翘
                            <input type="text" class="input" style="width: 50px" name="mould_in_c" value="{$rx.mould_in_c}">
                            度
                        </div>
                        <div class="controls">
                            第
                            <input type="text" class="input" style="width: 50px" name="mould_in_d" value="{$rx.mould_in_d}">
                            跖趾关节下免荷
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" style="width: 600px" name="mould_in_e" value="{$rx.mould_in_e}">
                        </div>
                    </div-->
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">楔形垫（外靴）：</label>
                    <div class="controls">
                        <select name="wedge_out_pos">
                            {:getFormDictSelectOption($rx['wedge_out_pos'],'wedge_pos','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        前足
                        <select name="wedge_out_b">
                            {:getFormDictSelectOption($rx['wedge_out_b'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_out_a" value="{$rx.wedge_out_a}">
                        度
                    </div>
                    <div class="controls">
                        中足
                        <select name="wedge_out_d">
                            {:getFormDictSelectOption($rx['wedge_out_d'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_out_c" value="{$rx.wedge_out_c}">
                        度
                    </div>
                    <div class="controls">
                        后足
                        <select name="wedge_out_f">
                            {:getFormDictSelectOption($rx['wedge_out_f'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_out_e" value="{$rx.wedge_out_e}">
                        度
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="wedge_out_g" value="{$rx.wedge_out_g}">
                    </div>
                </div>
                <div class="control-group combo-in">
                    <label class="control-label">楔形垫（内靴）：</label>
                    <div class="controls">
                        <select name="wedge_in_pos">
                            {:getFormDictSelectOption($rx['wedge_in_pos'],'wedge_pos','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        前足
                        <select name="wedge_in_b">
                            {:getFormDictSelectOption($rx['wedge_in_b'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_in_a" value="{$rx.wedge_in_a}">
                        度
                    </div>
                    <div class="controls">
                        中足
                        <select name="wedge_in_d">
                            {:getFormDictSelectOption($rx['wedge_in_d'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_in_c" value="{$rx.wedge_in_c}">
                        度
                    </div>
                    <div class="controls">
                        后足
                        <select name="wedge_in_f">
                            {:getFormDictSelectOption($rx['wedge_in_f'],'side','rx',1)}
                        </select>
                        <input type="text" class="input" style="width: 50px" name="wedge_in_e" value="{$rx.wedge_in_e}">
                        度
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="wedge_in_g" value="{$rx.wedge_in_g}">
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">鞋底改造：</label>
                    <div class="controls">
                        足跟
                        <select name="sole_a">
                            {:getFormDictSelectOption($rx['sole_a'],'sole_a','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        前足
                        <select name="sole_b">
                            {:getFormDictSelectOption($rx['sole_b'],'sole_b','rx',1)}
                        </select>
                        附加描述
                        <input type="text" class="input" style="width: 300px" name="sole_b_angle" value="{$rx.sole_b_angle}">
                    </div>
                    <div class="controls">
                        有效跟高
                        <input type="text" class="input" style="width: 50px" name="sole_c" value="{$rx.sole_c}">
                        mm
                    </div>
                    <div class="controls">
                        其它要求
                        <input type="text" class="input" style="width: 600px" name="sole_d" value="{$rx.sole_d}">
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">尼龙搭扣（外靴）：</label>
                    <div class="controls">————小腿————</div>
                    <div class="controls">
                        宽度
                        <select name="hasp_out_len_a">
                            {:getFormDictSelectOption($rx['hasp_out_len_a'],'hasp_len','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        材料
                        <select name="hasp_out_type_a">
                            {:getFormDictSelectOption($rx['hasp_out_type_a'],'haspa_type','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        系紧方式
                        <select name="hasp_out_tight_a">
                            {:getFormDictSelectOption($rx['hasp_out_tight_a'],'haspa_tight','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        起点
                        <select name="hasp_out_start_a">
                            {:getFormDictSelectOption($rx['hasp_out_start_a'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_a">
                            {:getFormDictSelectOption($rx['hasp_out_side_a'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        止点
                        <select name="hasp_out_start_a1">
                            {:getFormDictSelectOption($rx['hasp_out_start_a1'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_a1">
                            {:getFormDictSelectOption($rx['hasp_out_side_a1'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="hasp_out_other_a" value="{$rx.hasp_out_other_a}">
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">————踝上————</div>
                    <div class="controls">
                        宽度
                        <select name="hasp_out_len_b">
                            {:getFormDictSelectOption($rx['hasp_out_len_b'],'hasp_len','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        材料
                        <select name="hasp_out_type_b">
                            {:getFormDictSelectOption($rx['hasp_out_type_b'],'haspb_type','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        系紧方式
                        <select name="hasp_out_tight_b">
                            {:getFormDictSelectOption($rx['hasp_out_tight_b'],'haspb_tight','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        起点
                        <select name="hasp_out_start_b">
                            {:getFormDictSelectOption($rx['hasp_out_start_b'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_b">
                            {:getFormDictSelectOption($rx['hasp_out_side_b'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        止点
                        <select name="hasp_out_start_b1">
                            {:getFormDictSelectOption($rx['hasp_out_start_b1'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_b1">
                            {:getFormDictSelectOption($rx['hasp_out_side_b1'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="hasp_out_other_b" value="{$rx.hasp_out_other_b}">
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">————踝部————</div>
                    <div class="controls">
                        宽度
                        <select name="hasp_out_len_c">
                            {:getFormDictSelectOption($rx['hasp_out_len_c'],'hasp_len','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        材料
                        <select name="hasp_out_type_c">
                            {:getFormDictSelectOption($rx['hasp_out_type_c'],'haspa_type','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        系紧方式
                        <select name="hasp_out_tight_c">
                            {:getFormDictSelectOption($rx['hasp_out_tight_c'],'haspc_tight','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        起点
                        <select name="hasp_out_start_c">
                            {:getFormDictSelectOption($rx['hasp_out_start_c'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_c">
                            {:getFormDictSelectOption($rx['hasp_out_side_c'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        止点
                        <select name="hasp_out_start_c1">
                            {:getFormDictSelectOption($rx['hasp_out_start_c1'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_c1">
                            {:getFormDictSelectOption($rx['hasp_out_side_c1'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="hasp_out_other_c" value="{$rx.hasp_out_other_c}">
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">————前足————</div>
                    <div class="controls">
                        宽度
                        <select name="hasp_out_len_d">
                            {:getFormDictSelectOption($rx['hasp_out_len_d'],'hasp_len','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        材料
                        <select name="hasp_out_type_d">
                            {:getFormDictSelectOption($rx['hasp_out_type_d'],'haspb_type','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        系紧方式
                        <select name="hasp_out_tight_d">
                            {:getFormDictSelectOption($rx['hasp_out_tight_d'],'haspb_tight','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        起点
                        <select name="hasp_out_start_d">
                            {:getFormDictSelectOption($rx['hasp_out_start_d'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_d">
                            {:getFormDictSelectOption($rx['hasp_out_side_d'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        止点
                        <select name="hasp_out_start_d1">
                            {:getFormDictSelectOption($rx['hasp_out_start_d1'],'hasp_start','rx',1)}
                        </select>
                        <select name="hasp_out_side_d1">
                            {:getFormDictSelectOption($rx['hasp_out_side_d1'],'hasp_side','rx',1)}
                        </select>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" name="hasp_out_other_d" value="{$rx.hasp_out_other_d}">
                    </div>
                </div>
                <div class="combo-in">
                    <div class="control-group">
                        <label class="control-label">尼龙搭扣（内靴）：</label>
                        <div class="controls">————小腿————</div>
                        <div class="controls">
                            宽度
                            <select name="hasp_in_len_a">
                                {:getFormDictSelectOption($rx['hasp_in_len_a'],'hasp_len','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            材料
                            <select name="hasp_in_type_a">
                                {:getFormDictSelectOption($rx['hasp_in_type_a'],'haspa_type','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            系紧方式
                            <select name="hasp_in_tight_a">
                                {:getFormDictSelectOption($rx['hasp_in_tight_a'],'haspa_tight','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            起点
                            <select name="hasp_in_start_a">
                                {:getFormDictSelectOption($rx['hasp_in_start_a'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_a">
                                {:getFormDictSelectOption($rx['hasp_in_side_a'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            止点
                            <select name="hasp_in_start_a1">
                                {:getFormDictSelectOption($rx['hasp_in_start_a1'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_a1">
                                {:getFormDictSelectOption($rx['hasp_in_side_a1'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" name="hasp_in_other_a" value="{$rx.hasp_in_other_a}">
                        </div>
                    </div>
                    <div class="control-group">
                        <div class="controls">————踝上————</div>
                        <div class="controls">
                            宽度
                            <select name="hasp_in_len_b">
                                {:getFormDictSelectOption($rx['hasp_in_len_b'],'hasp_len','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            材料
                            <select name="hasp_in_type_b">
                                {:getFormDictSelectOption($rx['hasp_in_type_b'],'haspb_type','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            系紧方式
                            <select name="hasp_in_tight_b">
                                {:getFormDictSelectOption($rx['hasp_in_tight_b'],'haspb_tight','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            起点
                            <select name="hasp_in_start_b">
                                {:getFormDictSelectOption($rx['hasp_in_start_b'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_b">
                                {:getFormDictSelectOption($rx['hasp_in_side_b'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            止点
                            <select name="hasp_in_start_b1">
                                {:getFormDictSelectOption($rx['hasp_in_start_b1'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_b1">
                                {:getFormDictSelectOption($rx['hasp_in_side_b1'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" name="hasp_in_other_b" value="{$rx.hasp_in_other_b}">
                        </div>
                    </div>
                    <div class="control-group">
                        <div class="controls">————踝部————</div>
                        <div class="controls">
                            宽度
                            <select name="hasp_in_len_c">
                                {:getFormDictSelectOption($rx['hasp_in_len_c'],'hasp_len','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            材料
                            <select name="hasp_in_type_c">
                                {:getFormDictSelectOption($rx['hasp_in_type_c'],'haspa_type','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            系紧方式
                            <select name="hasp_in_tight_c">
                                {:getFormDictSelectOption($rx['hasp_in_tight_c'],'haspc_tight','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            起点
                            <select name="hasp_in_start_c">
                                {:getFormDictSelectOption($rx['hasp_in_start_c'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_c">
                                {:getFormDictSelectOption($rx['hasp_in_side_c'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            止点
                            <select name="hasp_in_start_c1">
                                {:getFormDictSelectOption($rx['hasp_in_start_c1'],'hasp_start','rx',1)}
                            </select>
                            <select name="hasp_in_side_c1">
                                {:getFormDictSelectOption($rx['hasp_in_side_c1'],'hasp_side','rx',1)}
                            </select>
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" name="hasp_in_other_c" value="{$rx.hasp_in_other_c}">
                        </div>
                    </div>
                </div>
                <hr class="half-rule">
                <div class="control-group">
                    <label class="control-label">切割线（外靴）:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<13; $i++) {
                            $cutlineArr[$i]["id"] = $i;
                            $cutlineArr[$i]["name"] = $formDict["cutline_".$i];
                            }
                            if (strlen($rx["cutline_out"]) > 0) {
                            $cutline_out_id=explode(',', $rx["cutline_out"]);
                            }

                        </php>
                        <foreach name="cutlineArr" item="vo">
                            <label class="checkbox inline">
                                <php>$cutline_out_id_checked=in_array($vo['id'],$cutline_out_id)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="cutline_out_id[]" {$cutline_out_id_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" style="width: 600px" name="cutline_out_other" value="{$rx.cutline_out_other}">
                    </div>
                    <div class="combo-in">
                        <label class="control-label">切割线（内靴）:</label>
                        <div class="controls">
                            <php>
                                for($i=0; $i<21; $i++) {
                                $cutlineinArr[$i]["id"] = $i;
                                $cutlineinArr[$i]["name"] = $formDict["cutlinein_".$i];
                                }
                                if (strlen($rx["cutline_in"]) > 0) {
                                $cutline_in_id=explode(',', $rx["cutline_in"]);
                                }

                            </php>
                            <foreach name="cutlineinArr" item="vo">
                                <label class="checkbox inline">
                                    <php>$cutline_in_id_checked=in_array($vo['id'],$cutline_in_id)?"checked":"";</php>
                                    <input value="{$vo.id}" type="checkbox" name="cutline_in_id[]" {$cutline_in_id_checked}>{$vo.name}
                                </label>
                            </foreach>
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" style="width: 600px" name="cutline_in_other" value="{$rx.cutline_in_other}">
                        </div>
                    </div>
                </div>

                <hr class="half-rule">
                <div class="control-group">
                    <label class="control-label">足底（外靴）:</label>
                    <div class="controls">
                        <php>
                            for($i=0; $i<7; $i++) {
                            $pelmaArr[$i]["id"] = $i;
                            $pelmaArr[$i]["name"] = $formDict["pelma_".$i];
                            }
                            if (strlen($rx["pelma_out"]) > 0) {
                            $pelma_out_id=explode(',', $rx["pelma_out"]);
                            }

                        </php>
                        <foreach name="pelmaArr" item="vo">
                            <label class="checkbox inline">
                                <php>$pelma_out_id_checked=in_array($vo['id'],$pelma_out_id)?"checked":"";</php>
                                <input value="{$vo.id}" type="checkbox" name="pelma_out_id[]" {$pelma_out_id_checked}>{$vo.name}
                            </label>
                        </foreach>
                    </div>
                    <div class="controls">
                        其它
                        <input type="text" class="input" style="width: 600px" style="width: 600px" name="pelma_out_other" value="{$rx.pelma_out_other}">
                    </div>
                    <div class="combo-in">
                        <label class="control-label">足底（内靴）:</label>
                        <div class="controls">
                            <php>
                                for($i=0; $i<6; $i++) {
                                $pelmainArr[$i]["id"] = $i;
                                $pelmainArr[$i]["name"] = $formDict["pelma_".$i];
                                }
                                if (strlen($rx["pelma_in"]) > 0) {
                                $pelma_in_id=explode(',', $rx["pelma_in"]);
                                }

                            </php>
                            <foreach name="pelmainArr" item="vo">
                                <label class="checkbox inline">
                                    <php>$pelma_in_id_checked=in_array($vo['id'],$pelma_in_id)?"checked":"";</php>
                                    <input value="{$vo.id}" type="checkbox" name="pelma_in_id[]" {$pelma_in_id_checked}>{$vo.name}
                                </label>
                            </foreach>
                        </div>
                        <div class="controls">
                            其它
                            <input type="text" class="input" style="width: 600px" style="width: 600px" name="pelma_in_other" value="{$rx.pelma_in_other}">
                        </div>
                    </div>
                </div>
                <hr class="half-rule">

                <div class="control-group">
                    <label class="control-label">备注：</label>
                    <div class="controls">
                        <textarea style="height:5rem; width: 40rem;" name="note">{$rx.note}</textarea>
                    </div>
                </div>
                <hr class="half-rule">
                <div class="control-group">
                    <label class="control-label">价格：</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 100px" name="price" value="{$rx.price}">
                        元
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">其他矫形器：</label>
                    <div class="controls">
                        <input type="text" class="input" style="width: 480px" name="other_type" value="{$rx.other_type}">
                        价格：
                        <input type="text" class="input" style="width: 100px" name="other_price" value="{$rx.other_price}">
                        元
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label">预计交付日期：</label>
                    <div class="controls">
                        <input type="text" class="input J_date" style="width: 100px" name="delivery_date" value="{$rx.delivery_date}">
                    </div>
                </div>
                <hr class="half-rule">
                <div class="control-group">
                    <div class="controls">
                        <label class="checkbox inline" style="font-weight: bold">
                            <input type="checkbox"  name="completed">完成（勾选后提交处方将无法再次修改）
                        </label>
                    </div>
                </div>

            </fieldset>
            <div class="form-actions">
                <input type="hidden" name="rxId" value="{$rxId}" />
                <input type="hidden" name="id" value="{$id}" />
                <button type="submit" class="btn btn-primary btn_submit ">更新</button>
                <a class="btn" href="__URL__">返回</a>
            </div>
        </form>
    </div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>